package chixing.day12.work.w1;

public class ClassMain {
    public static void main(String[] args) {
        MailAddressArrayList mailManager = new MailAddressArrayList();

        // 添加几个客户的邮件地址
        mailManager.add(new MailAddress(
                "张三",
                "13800138000",
                "中关村大街1号",
                "北京市",
                "北京市",
                "中国",
                "100080"
        ));

        mailManager.add(new MailAddress(
                "李四",
                "13900139000",
                "南京东路123号",
                "上海市",
                "上海市",
                "中国",
                "200001"
        ));

        mailManager.add(new MailAddress(
                "张三",
                "13700137000",
                "天河路385号",
                "广州市",
                "广东省",
                "中国",
                "510620"
        ));

        mailManager.add(new MailAddress(
                "王五",
                "13600136000",
                "人民路100号",
                "武汉市",
                "湖北省",
                "中国",
                "430000"
        ));

        // 显示所有客户邮件地址
        mailManager.display();

        // 测试根据姓名查询
        mailManager.getByLastName("张三");
        mailManager.getByLastName("赵六");
    }
}

